package org.example.Day12;

public class Cat {
    private String name;
    private  int age;
    public Cat(){
        System.out.println("无参函数构造器执行了");
    }
    private Cat(String name,int age){
        System.out.println("有参函数构造器执行了");
        this.name=name;
        this.age=age;

    }
    private void run(){
        System.out.println("(>^ω^<)喵跑得贼快~~");
    }
    public void eat(){
        System.out.println("(>^ω^<)喵爱吃猫粮~");
    }
    private String eat(String name){
        return "(>^ω^<)喵爱吃:"+name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
